package com.kaibes.test;

import java.util.ArrayList;
import java.util.List;

import com.kaibes.object.annotation.BesResource;
import com.kaibes.test.data.UserData;

@BesResource
public class Creater {

	@BesResource
	public UserData user1() {
		UserData data = new UserData();
		data.setUsername("yolinfeng");
		data.setPassword("123456");
		return data;
	}

	@BesResource
	public UserData user2(@BesResource("user1") UserData user1) {
		UserData data = new UserData();
		data.setUsername(user1.getUsername() + "2");
		data.setPassword(user1.getPassword() + "2");
		return data;
	}

	@BesResource
	public List<UserData> userDatas(@BesResource("user1") UserData arg1, @BesResource("user2") UserData arg2) {
		List<UserData> userDatas = new ArrayList<>();
		userDatas.add(arg1);
		userDatas.add(arg2);
		return userDatas;
	}

}
